package android.slc.icr.core.entity;

import java.io.Serializable;

public class IcrMessage implements Serializable {
    public static final String MSG_TYPE_C2C = "c2c";
    public static final String MSG_TYPE_CHART_ROOM = "chartRoom";
    public static final String MSG_TYPE_CHART_ROOM_LIVE = "chartRoomLive";
    public static final String TAG = "slcIcr";

    private String tag;
    private String action;
    private String title;
    private String content;
    private String sender;
    private String receiver;
    private String relate;//消息有关的类型
    private String relateId;//消息有关的id
    private String format;

    public IcrMessage() {
    }

    public IcrMessage(String tag, String action, String title, String content, String sender, String receiver, String relate,
                      String relateId, String format) {
        this.tag = tag;
        this.action = action;
        this.title = title;
        this.content = content;
        this.sender = sender;
        this.receiver = receiver;
        this.relate = relate;
        this.relateId = relateId;
        this.format = format;
    }

    public String getTag() {
        return tag;
    }

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getSender() {
        return sender;
    }

    public void setSender(String sender) {
        this.sender = sender;
    }

    public String getReceiver() {
        return receiver;
    }

    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }

    public String getRelate() {
        return relate;
    }

    public void setRelate(String relate) {
        this.relate = relate;
    }

    public String getRelateId() {
        return relateId;
    }

    public void setRelateId(String relateId) {
        this.relateId = relateId;
    }

    public String getFormat() {
        return format;
    }

    public void setFormat(String format) {
        this.format = format;
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public static class Builder {
        private String action;
        private String title;
        private String content;
        private String sender;
        private String receiver;
        private String relate;//消息标记
        private String relateId;
        private String format;

        public Builder setAction(String action) {
            this.action = action;
            return this;
        }

        public Builder setTitle(String title) {
            this.title = title;
            return this;
        }

        public Builder setContent(String content) {
            this.content = content;
            return this;
        }

        public Builder setSender(String sender) {
            this.sender = sender;
            return this;
        }

        public Builder setReceiver(String receiver) {
            this.receiver = receiver;
            return this;
        }

        public Builder setRelate(String relate) {
            this.relate = relate;
            return this;
        }

        public Builder setRelateId(String relateId) {
            this.relateId = relateId;
            return this;
        }

        public Builder setFormat(String format) {
            this.format = format;
            return this;
        }

        public IcrMessage build() {
            return new IcrMessage(TAG, action, title, content, sender, receiver, relate, relateId, format);
        }
    }

}
